#ifndef SEND_MSG_H
#define SEND_MSG_H

#include "http_post.h"

class Send_Msg : public Http_Post
{
	Q_OBJECT
public:
	Send_Msg(Http_Post *parent = 0);
	~Send_Msg();


	Q_INVOKABLE void sendV2(QString uin, QString sid, QString skey, QString deviceId,
							QString fromUserName, QString toUserName, QString content, QStringList syncKey);
	Q_INVOKABLE void postV2(QString uin, QString sid, QString skey, QString deviceId,
								QString fromUserName, QString toUserName, QString content);
	Q_INVOKABLE void syncV2(QString uin, QString sid, QString skey, QStringList syncKey);

protected:
	void finished(QNetworkReply* reply);

private:
	void m_saveLog(QString fromUserName, QString toUserName, QString content);
	void m_post(QString host, QString uin, QString sid, QString skey,
				QString deviceId, QString fromUserName, QString toUserName, QString content);
	void m_sync(QString host, QString uin, QString sid, QString skey, QStringList syncKey);
};

#endif // SEND_MSG_H
